<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib   uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@include file="/WEB-INF/jsp/common/head.jsp"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   <%--  <base href="<%=basePath%>"> --%>
    
    <title>My JSP 'selectcaoliaos.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
   <style type="text/css">
   td{line-height: 40px;font-size: 15px;}
   .aa{position: relative;top:80px;left: -70px;}
   .cc{text-align: center;padding-right: 10px;}
   .tianjia{border: 1px solid;padding:6px;position: absolute;right: 90px;top:98px;
   background-color: blue;color: white;padding-left: 15px;padding-right:15px;font-weight: bolder;
   padding-top: 10px;padding-bottom: 10px;border-radius:15px;
   }
   .nn{position: absolute;top:98px;left: 800px;}
   .ss{position: relative;left:250px;top:30px;}
   .yy{position: relative;left:450px;top:10px;}
   #dd{position: absolute;left:320px;top:106px;font-size: 15px;color: blue;font-weight: bold;} 
   .shanchu{position: relative;right: 90px;}
    #ee{position: absolute;left:520px;top:106px;font-size: 15px;color: blue;font-weight: bold;} 
   .shanchu{position: relative;right: 90px;}
   </style>
  </head>
  
  <body>
  <form action="">
   <span id="dd">是否入库：</span>				
  <select class="ss" name="clstuck">
  <option value="0">请选择</option>
  <option value="1">入库</option>
  <option value="2">未入库</option>
  </select>
  <span id="ee">是否退货：</span>				
  <select class="yy" name="cltuihuo">
  <option value="2">请选择</option>
  <option value="0">退货</option>
  <option value="1">未退货</option>
  </select>
					 <input type="hidden" name="pageIndex" value="1"/> 
					 <input	value="查 询" type="submit" id="searchbutton" class="nn">
					 <a href="${pageContext.request.contextPath}/addcailiao" class="tianjia">添加材料</a>
  </form>
      <input type="hidden" name="pageIndex" value="1" />
  <table class="aa">
    <tr>
    <td  width="10%">材料名称 </td>
    <td width="10%">材料数量</td>
    <td width="10%">材料供应商</td>
    <td width="10%">材料价格</td>
    <td width="10%">进货日期</td>
     <td width="10%">客户地址</td>
     <td width="10%">客户电话</td>
     <td width="5%">选择操作</td>
    </tr>
  
  <c:forEach items="${list}" var="list" varStatus="status">
  <tr>
  <td><span>${list.clname}</span></td> 
   <td><span>${list.clnumber }</span></td>
   <td><span>${list. clchangjia}</span></td>
   <td><span> ${list.clsize}</span></td>
  <td> <fmt:formatDate value="${list.cldate }" pattern="yyyy-MM-dd"/> </td>
       <td><span>${list.khdname }</span></td>
        <td><span>${list.khphone }</span></td>
         <td><a href="">查看</a></td>
        <td><a href="">修改</a></td>
        <td><a class="shanchu" href="deletecailiao?dingdanId=${list.dingdanId}">删除</a></td>

      </tr>
  </c:forEach> 
  
  
  </table>
    <input type="hidden" id="totalPageCount" value="${totalPageCount}"/>
		  	<c:import url="rollpage.jsp">
	          	<c:param name="totalCount" value="${totalCount}"/>
	          	<c:param name="currentPageNo" value="${currentPageNo}"/>
	          	<c:param name="totalPageCount" value="${totalPageCount}"/>
          	</c:import>
       
         <script type="text/javascript" src="${pageContext.request.contextPath}/statics/js/jquery-1.8.3.min.js"></script> 	
 <script type="text/javascript">
 $(function(){
 
 $(".shanchu").on("click",function(){
    var meg="你确定提交吗？";
   
  if (confirm(meg)==true) { 
          return ture;
              
        }  
        else {  
             return false;
             
        }  
 
 });
 
 
 
 
 
 
 });
 
 
 </script>
  </body>
  <%@include file="/WEB-INF/jsp/common/foot.jsp"%>
</html>
